import type { CategoryItemResult } from '@/types/category'
import request from '@/utils/request/request'

/**
 * 获取商家菜品分类
 * @param businessId
 * @param type
 * @returns
 */
export const getCategoryListAPI = (businessId: number, type?: number) => {
  return request<CategoryItemResult[]>({
    method: 'GET',
    url: '/category/list',
    params: { businessId, type },
  })
}
